import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

import { MainRoutingModule } from './main-routing.module';
import { MainComponent } from './main.component';
import { CommodityManagementComponent } from './commodity-management/commodity-management.component';
import { PersonCenterComponent } from './person-center/person-center.component';

import { NzButtonModule } from 'ng-zorro-antd/button';
import { NzIconModule } from 'ng-zorro-antd/icon';
import { NzInputModule } from 'ng-zorro-antd/input';
import {
  AccountBookFill,
  AlertFill,
  AlertOutline,
  EyeOutline,
  EyeInvisibleOutline,
  PlusOutline,
  DeleteOutline,
  CloseOutline,
  CheckOutline,
  BorderOutline,
} from '@ant-design/icons-angular/icons';
import { NzModalModule } from 'ng-zorro-antd/modal';

const icons = [
  EyeOutline,
  CloseOutline,
  EyeInvisibleOutline,
  PlusOutline,
  CheckOutline,
  DeleteOutline,
  BorderOutline,
];
import { NzTableModule } from 'ng-zorro-antd/table';
import { NzTabsModule } from 'ng-zorro-antd/tabs';
import { CommodityDetailComponent } from './commodity-management/commodity-detail/commodity-detail.component';
import { DetailComponent } from './commodity-management/commodity-detail/detail/detail.component';
import { OutLogComponent } from './commodity-management/commodity-detail/out-log/out-log.component';
import { InLogComponent } from './commodity-management/commodity-detail/in-log/in-log.component';
import { NzPopoverModule } from 'ng-zorro-antd/popover';
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { Interceptor } from '../common/Interceptor';
import { FormsModule } from '@angular/forms';
import { AddCommodityComponent } from './add-commodity/add-commodity.component';
import { NzMessageModule } from 'ng-zorro-antd/message';
@NgModule({
  declarations: [
    MainComponent,
    CommodityManagementComponent,
    PersonCenterComponent,
    CommodityDetailComponent,
    DetailComponent,
    OutLogComponent,
    InLogComponent,
    AddCommodityComponent,
  ],
  imports: [
    CommonModule,
    MainRoutingModule,
    NzButtonModule,
    NzInputModule,
    NzIconModule.forChild(icons),
    NzTableModule,
    NzTabsModule,
    NzPopoverModule,
    NzModalModule,
    FormsModule,
    HttpClientModule,
    FormsModule,
    NzMessageModule,
  ],
  providers: [
    { provide: HTTP_INTERCEPTORS, useClass: Interceptor, multi: true },
  ],
})
export class MainModule {}
